{include file="layout/layout" /}
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
            <div class="subject">
                <h3>商品管理</h3>
                <h5>{if input('get.id')}修改{else/}添加{/if}商品分类</h5>
            </div>
        </div>
    </div>
    <div id="explanation" class="explanation">
        <div id="checkZoom" class="title">
        <i class="fa fa-lightbulb-o"></i>
        <h4 title="提示相关设置操作时应注意的要点">操作提示</h4><span title="收起提示" id="explanationZoom"></span>
        </div>
        <ul>
        <!-- <li>商品分类最多分为三级</li> -->
        </ul>
    </div>
    {if input('get.id')}
        <form action="?act=u" method='post'>
        <input type="hidden" name='sg_id' value="{:input('get.id')}">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label>分类名称</label>
                </dt>
                <dd class="opt">
                    <input class="input-txt valid" name="sg_name" value="{$cate.sg_name}" type="text" required maxlength='4'>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>排序</label>
                </dt>
                <dd class="opt">
                    <input class="input-txt valid" name="sg_sort" value="{$cate.sg_sort}" type="text" maxlength='4'>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>状态</label>
                </dt>
                <dd class="opt">
                    <div class="onoff">
                        <label for="is_distribut1" class="cb-enable{if $cate.sg_status==1} selected{/if}"><span>正常</span></label>
                        <label for="is_distribut2" class="cb-disable{if $cate.sg_status==0} selected{/if}"><span>不显示</span></label>
                        <input id="is_distribut1" name="sg_status" value="1" type="radio" >
                        <input id="is_distribut2" name="sg_status" value="0" type="radio" >
                    </div>
                </dd>
            </dl>
            <div class="bot"><button id="button" style="width:96px;height:35px;background: #4FC0E8;border-radius:5px;line-height:35px;text-align: center;color:#fff;border: 0;font-size: 15px;">确认提交</button></div>
        </div> 
        </form>
    {else/}
        <form action="?act=a" method='post'>
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label>分类名称</label>
                </dt>
                <dd class="opt">
                    <input class="input-txt valid" name="sg_name" type="text" required maxlength='4'>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>排序</label>
                </dt>
                <dd class="opt">
                    <input class="input-txt valid" name="sg_sort" type="text" maxlength='4'>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>状态</label>
                </dt>
                <dd class="opt">
                    <div class="onoff">
                        <label for="is_distribut1" class="cb-enable"><span>正常</span></label>
                        <label for="is_distribut2" class="cb-disable"><span>不显示</span></label>
                        <input id="is_distribut1" name="sg_status" value="1" type="radio" >
                        <input id="is_distribut2" name="sg_status" value="0" type="radio" >
                    </div>
                </dd>
            </dl>
            <div class="bot"><button id="button" style="width:96px;height:35px;background: #4FC0E8;border-radius:5px;line-height:35px;text-align: center;color:#fff;border: 0;font-size: 15px;">确认提交</button></div>
        </div> 
        </form>
    {/if}
</div>
</body></html>